include ../../defaults.mk

LIBS	 += -lpthread
INCPATH	 += 

SOURCES = Entry.cc LogOutput.cc Logger.cc Log.cc LogManager.cc
SOURCES += Appender.cc FileAppender.cc AppenderFactory.cc

LNK_SOURCES += Mutex.cc Thread.cc ReaderWriter.cc
EXE_SOURCES += testlogging.cc

ALL_OBJECTS = $(SOURCES:.cc=.o) $(EXE_SOURCES:.cc=.o)
OBJECTS_FP = $(addprefix $(BUILD_DIR),$(SOURCES:.cc=.o))
OBJECTS_FP += $(addprefix $(BUILD_DIR),$(LNK_SOURCES:.cc=.o))
OBJECTS_FP += $(addprefix $(BUILD_DIR),$(EXE_SOURCES:.cc=.o))

all: $(ALL_OBJECTS) logging

$(ALL_OBJECTS): %.o: %.cc
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$(BUILD_DIR)$@" "$<"

logging: $(OBJECTS_FP)
	$(CXX) $(CXXFLAGS) -o $(BIN_DIR)/testlogging $(OBJECTS_FP) $(LIBS)



